package battle
{
	import flash.display.BitmapData;
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class BaseObject
	{
		protected var _pos:Point;
		protected var _graphic:Graphic;
		protected var _destroyed:Boolean;
		
		public function BaseObject()
		{
			_pos = new Point( 0, 0 );	
		}
		
		public  function onEnterFrame( dt:int ):void
		{
			
		}
		
		public function getGraphic():Graphic
		{
			return _graphic;
		}
		
		public function init( dataObj:Object ):void
		{
			
		}
		
		public function destroy():void
		{
			_destroyed = true;
			
			_graphic = null;
			
			_pos = null;
		}
		
		public function isValid():Boolean
		{
			return !_destroyed;
		}
		
		public function get pos():Point
		{
			return _pos;
		}
		
	}
}